import Http, {HttpParamsProps, ReqProps} from "@/common/http";
import {BaseEntitys} from "@/common/httptypes";


//后期需整改数据-没用的删掉
export type BankTemplateEntity = {
  id: string
  bankName?: string
  decription?: string
  defaultVal?: string
  del?: boolean
  dictCode?: string
  keyCode?: string
  required?: boolean
  sortNum?: string
  targetId?: string
  targetType?: string
  type?: string
} & BaseEntitys



class BankTemplate {
    RowKey = "id"
    EDIT = "bankTemplateTableEdit"
    ADD = "bankTemplateTableAdd"
    DEL = "bankTemplateTableDelete"
    
    MAPPING = {bankTemplateTableEdit: "编辑模板", bankTemplateTableAdd: "新增模板"}

    selectTablePage(props: HttpParamsProps): Promise<Response> {
        return Http.get("/bankTemplate/select", props)
    }

    doEdit(props: ReqProps<void>) {
        Http.doPost("/bankTemplate/updateById", props)
    }
    doSave(props: ReqProps<void>) {
        Http.doPost("/bankTemplate/save", props)
    }

    delete(props: ReqProps<void>) {
        Http.doDelete("/bankTemplate/deleteById", props)
    }

}

// eslint-disable-next-line import/no-anonymous-default-export
export default new BankTemplate()